using System;
using ICSharpCode.TextEditor.Formatting.TSqlFormatter;

namespace ICSharpCode.TextEditor.Formatting
{
    public class TsqlFormattingStrategy : IFormattingStrategy
    {
        public string StringFormat(string content)
        {
            string empty = string.Empty;
            try
            {
                if (string.IsNullOrEmpty(content))
                {
                    return content;
                }
                bool errorsEncountered = false;
                return SqlFormattingManager.DefaultFormat(content, ref errorsEncountered);
            }
            catch (Exception)
            {
                return content;
            }
        }
    }
}
